package com.zgg.utils;

import java.util.Date;
import java.util.UUID;

/**
 * Created by li on 2017/6/6.
 */
public class UUIDUtils {

    /**
     * 生成UUID
     *
     * @return
     */
    public static String getUUID() {
        return UUID.randomUUID().toString().replace("-", "").toUpperCase();
    }

    public static String IdGenerate() {
        StringBuffer id = new StringBuffer(getUUID());
        id.append("-").append(DateUtils.getDateByFormat(new Date(), "yyyy"));
        return id.toString();
    }

}
